package com.ruoyi.project.modules.table.domain;

import com.ruoyi.project.modules.tableRelation.domain.TableRelation;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import java.util.List;

/**
 * 字段信息对象 t_field_info
 * 
 * @author smallrain
 * @date 2021-10-28
 */
public class FieldInfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long id;

    /** 表ID */
    @Excel(name = "表ID")
    private Long tableId;

    /** 分类（固定值1或者2）*/
    @Excel(name = "分类")
    private String category;

    /** 字段名称 */
    @Excel(name = "字段名称")
    private String fieldName;

    /** 字段英文名称 */
    @Excel(name = "字段英文名称")
    private String fieldEnName;

    @Excel(name = "是否状态字段", readConverterExp = "Y=是,N=否")
    private String isFieldStatus;

    @Excel(name = "是否枚举字段", readConverterExp = "Y=是,N=否")
    private String isFieldEnum;

    /** 字段类型（1主键 2外键 3属性） */
    @Excel(name = "字段类型", readConverterExp = "1=主键,2=外键,3=属性")
    private String fieldType;

    private String fieldLength;

    /** 外键类型（1核心模型关系 2冗余模型关系） */
    @Excel(name = "外键类型", readConverterExp = "1=核心模型关系,2=冗余模型关系")
    private String fkFieldType;

    /** 字段数据类型（1文本 2数字 3时间） */
    @Excel(name = "字段数据类型", readConverterExp = "1=文本,2=数字,3=时间")
    private String fieldDataType;

    private String mysqlFieldName;
    private String mysqlFieldDataType;
    private String mysqlFieldLength;
    private String isChange;

    /** 模拟数据 */
    @Excel(name = "模拟数据")
    private String mockData;

    /** 模拟数据明细举例 */
    @Excel(name = "模拟数据明细举例")
    private String mockDescription;

    /** 字段需求故事 */
    @Excel(name = "字段需求故事")
    private String fieldStory;

    /** 是否必填（Y是 N否） */
    @Excel(name = "是否必填", readConverterExp = "Y=是,N=否")
    private String isRequired;

    /** 是否作为入参（Y是 N否） */
    @Excel(name = "是否作为入参", readConverterExp = "Y=是,N=否")
    private String isInParam;

    /** 是否风险点（Y是 N否） */
    @Excel(name = "是否风险点", readConverterExp = "Y=是,N=否")
    private String isRisk;

    /** 风险备注 */
    @Excel(name = "风险备注")
    private String riskRemark;

    /** 状态（0正常 1停用） */
    @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
    private String status;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    private Integer orderNum;

    private Long dictId;

    private Long interfaceId;

    /**
     * 字段描述
     */
    private String fieldDescription;

    /**
     * 字段设计内容
     */
    private String designContent;

    private Integer recordIndex;

    private List<TableRelation> tableRelationList;

    private String tableRelationListStr;
    private String tableName;
    private String tableEnName;

    private Integer minLength;

    public Integer getMinLength() {
        return minLength;
    }

    public void setMinLength(Integer minLength) {
        this.minLength = minLength;
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public String getTableEnName() {
        return tableEnName;
    }

    public void setTableEnName(String tableEnName) {
        this.tableEnName = tableEnName;
    }

    public List<TableRelation> getTableRelationList() {
        return tableRelationList;
    }

    public String getTableRelationListStr() {
        return tableRelationListStr;
    }

    public void setTableRelationListStr(String tableRelationListStr) {
        this.tableRelationListStr = tableRelationListStr;
    }

    public void setTableRelationList(List<TableRelation> tableRelationList) {
        this.tableRelationList = tableRelationList;
    }

    public Integer getRecordIndex() {
        return recordIndex;
    }

    public void setRecordIndex(Integer recordIndex) {
        this.recordIndex = recordIndex;
    }

    public String getFieldDescription() {
        return fieldDescription;
    }

    public void setFieldDescription(String fieldDescription) {
        this.fieldDescription = fieldDescription;
    }

    public String getDesignContent() {
        return designContent;
    }

    public void setDesignContent(String designContent) {
        this.designContent = designContent;
    }

    public Long getInterfaceId() {
        return interfaceId;
    }

    public void setInterfaceId(Long interfaceId) {
        this.interfaceId = interfaceId;
    }

    public Long getDictId() {
        return dictId;
    }

    public void setDictId(Long dictId) {
        this.dictId = dictId;
    }

    public Integer getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(Integer orderNum) {
        this.orderNum = orderNum;
    }

    public String getMysqlFieldName() {
        return mysqlFieldName;
    }

    public void setMysqlFieldName(String mysqlFieldName) {
        this.mysqlFieldName = mysqlFieldName;
    }

    public String getMysqlFieldDataType() {
        return mysqlFieldDataType;
    }

    public void setMysqlFieldDataType(String mysqlFieldDataType) {
        this.mysqlFieldDataType = mysqlFieldDataType;
    }

    public String getMysqlFieldLength() {
        return mysqlFieldLength;
    }

    public void setMysqlFieldLength(String mysqlFieldLength) {
        this.mysqlFieldLength = mysqlFieldLength;
    }

    public String getIsChange() {
        return isChange;
    }

    public void setIsChange(String isChange) {
        this.isChange = isChange;
    }

    public String getFieldLength() {
        return fieldLength;
    }

    public void setFieldLength(String fieldLength) {
        this.fieldLength = fieldLength;
    }

    public String getIsFieldEnum() {
        return isFieldEnum;
    }

    public void setIsFieldEnum(String isFieldEnum) {
        this.isFieldEnum = isFieldEnum;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public String getIsFieldStatus() {
        return isFieldStatus;
    }

    public void setIsFieldStatus(String isFieldStatus) {
        this.isFieldStatus = isFieldStatus;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setTableId(Long tableId) 
    {
        this.tableId = tableId;
    }

    public Long getTableId() 
    {
        return tableId;
    }
    public void setFieldName(String fieldName) 
    {
        this.fieldName = fieldName;
    }

    public String getFieldName() 
    {
        return fieldName;
    }
    public void setFieldEnName(String fieldEnName) 
    {
        this.fieldEnName = fieldEnName;
    }

    public String getFieldEnName() 
    {
        return fieldEnName;
    }
    public void setFieldType(String fieldType) 
    {
        this.fieldType = fieldType;
    }

    public String getFieldType() 
    {
        return fieldType;
    }
    public void setFkFieldType(String fkFieldType) 
    {
        this.fkFieldType = fkFieldType;
    }

    public String getFkFieldType() 
    {
        return fkFieldType;
    }
    public void setFieldDataType(String fieldDataType) 
    {
        this.fieldDataType = fieldDataType;
    }

    public String getFieldDataType() 
    {
        return fieldDataType;
    }
    public void setMockData(String mockData) 
    {
        this.mockData = mockData;
    }

    public String getMockData() 
    {
        return mockData;
    }
    public void setMockDescription(String mockDescription) 
    {
        this.mockDescription = mockDescription;
    }

    public String getMockDescription() 
    {
        return mockDescription;
    }
    public void setFieldStory(String fieldStory) 
    {
        this.fieldStory = fieldStory;
    }

    public String getFieldStory() 
    {
        return fieldStory;
    }
    public void setIsRequired(String isRequired) 
    {
        this.isRequired = isRequired;
    }

    public String getIsRequired() 
    {
        return isRequired;
    }
    public void setIsInParam(String isInParam) 
    {
        this.isInParam = isInParam;
    }

    public String getIsInParam() 
    {
        return isInParam;
    }
    public void setIsRisk(String isRisk) 
    {
        this.isRisk = isRisk;
    }

    public String getIsRisk() 
    {
        return isRisk;
    }
    public void setRiskRemark(String riskRemark) 
    {
        this.riskRemark = riskRemark;
    }

    public String getRiskRemark() 
    {
        return riskRemark;
    }
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }
    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("tableId", getTableId())
            .append("fieldName", getFieldName())
            .append("fieldEnName", getFieldEnName())
            .append("fieldType", getFieldType())
            .append("fkFieldType", getFkFieldType())
            .append("fieldDataType", getFieldDataType())
            .append("mockData", getMockData())
            .append("mockDescription", getMockDescription())
            .append("fieldStory", getFieldStory())
            .append("isRequired", getIsRequired())
            .append("isInParam", getIsInParam())
            .append("isRisk", getIsRisk())
            .append("riskRemark", getRiskRemark())
            .append("status", getStatus())
            .append("delFlag", getDelFlag())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
